//倒计时-限时抢购

import { } from "https://cdn.bootcdn.net/ajax/libs/jquery/1.12.4/jquery.js";

function djs() {
    let $futureTime = new Date("2022/2/08 16:00:00");
    let $nowTime = new Date();
    let $time = parseInt($futureTime - $nowTime) / 1000;
    let $h = parseInt($time % 86400 / 3600);
    let $m = parseInt($time % 3600 / 60);
    let $s = parseInt($time % 60);
    function double(n) {
        return n < 10 ? "0" + n : n;
    }
    return `${double($h)}${double($m)}${double($s)}`
}
$(".mod_time_rush .time_h").html(djs().substring(0, 2));
$(".mod_time_rush .time_m").html(djs().substring(2, 4));
$(".mod_time_rush .time_s").html(djs().substring(4, 6));
setInterval(function () {
    $(".mod_time_rush .time_h").html(djs().substring(0, 2));
    $(".mod_time_rush .time_m").html(djs().substring(2, 4));
    $(".mod_time_rush .time_s").html(djs().substring(4, 6));
}, 1000);